package top.kaoshanji.q1ch06a.main;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import top.kaoshanji.q1ch06a.config.ProjectConfig;
import top.kaoshanji.q1ch06a.model.Comment;
import top.kaoshanji.q1ch06a.services.CommentService;

/**
 * 代码清单-q1ch06a-120页a：实现切面逻辑
 * @author kaoshanji
 * ^_^
 * create time 2025/4/28 16:55
 */
public class Main {

    public static void main(String[] args) {

        var context = new AnnotationConfigApplicationContext(ProjectConfig.class);

        var service = context.getBean(CommentService.class);

        Comment comment = new Comment();
        comment.setText("Text");
        comment.setAuthor("Author");

        service.publishComment(comment);

    }

}
